package com.lms.service;

import com.lms.bean.Book;
import com.lms.util.QueryResult;
import com.lms.vo.BookVO;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;

public interface BookService {
    Long getTotalCount();

    List<BookVO> findAll(int page, int pageSize);

    Long getTotalCount(String bookName);

    List<BookVO> findAll(int page, int pageSize, String bookName);

    Book findBookById(Long bookId);

    void save(Book book);

    void deleteById(Long bookId);

    void deleteAll(String ids);

    QueryResult<BookVO> queryByKeyWordLikeNoType(int page, int pageSize,Book param);

    QueryResult<BookVO> queryByKeyWordLikeWithType(int page, int pageSize,Book param, long typeId);

    Page<Book> findByKeyWord(String keyword, Pageable pageable);

    Page<Book> findByKeyWordWithTypeId(String keyword, Long typeId, Pageable pageable);

    List<Book> findByHistory();
}
